

    
      <div id="smsFA" style="color:red"></div>
      
                          <table id ="table" width="7026" border="0" cellpadding="11">
                            
     <g:each status ="i" var="it2" in="${channel}">
                                  <tr id=${ (i % 2) == 0 ? 'c3' : 'c1'}>
                              <td id="c0" style="min-width: 90px">
                                <!--<img src="${resource(dir:"images", file: "1.png") }" width="73" height="36"/>-->
                                ${it2.channel_name}
                                <br></td>
                              
        <g:each var="it3" status ="t" in="${program[it2.id]}">
          
                                 <%
                                def temp2 = '<b> Título: </b>' + it3.prog_title + '<br><br> <b> Começa às: </b>' + it3.prog_start + '<br><b> Acaba às: </b>' +  it3.prog_end + '<br><br><b> Descrição: </b>' + it3.prog_description 
                                
                                def dif = it3.prog_duration.toInteger()/60
                                
                                 def res = (dif * 90 ) / 60
                                %>
          
                              <td style="width: min-width:90px">
                                
                              <tooltip:tip value="${temp2}" stylesheet="myTooltipStyles">
                                <div id="date">
                                  <u><g:formatDate format="HH:mm" date="${it3.prog_start}"/> - <g:formatDate format="HH:mm" date="${it3.prog_end}"/></u>
                                </div>
                                <center>
                                  <div id="fa_">
                                    
                                    <g:if test="${tv_megazineplus.Alert.findByUserAndProgram(tv_megazineplus.Users.get(session.user), tv_megazineplus.Programmation.get(it3.id))}">
                                    <img src="${resource(dir:"images", file: "fav.png") }" width="21" onClick="alert('Alert already added!')" height="18"/>
                                    </g:if>
                                    <g:else>
                                         <g:link action="alert" params="[prog: it3.id]">
                                        <img src="${resource(dir:"images", file: "fav.png") }" width="21" height="18"/>
                                    </g:link>
                                    </g:else>
                                    

                                  </div>
                                </center>
                                
                                
                              </div><div>
                                <div id="div_title">
                                  <%
                                  if(it3.prog_title.size() > 25){
                                  def temp = it3.prog_title[0..24] + " ..."
                                  out << temp
                                  }else
                                  out << it3.prog_title
                                  %>
                                </div>
                                
                                </tooltip:tip>
                              
                              </td>
                              
                              
        </g:each>
                            </tr>
                            
                            
                            
   </g:each> 
                  
                          </table>
                          
                                